﻿using System.Drawing;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraEditors.Repository;
using Loki.UI.Win;

namespace Luna.UI.Win
{
    public class LunaView : FormBase
    {
        private DevExpress.XtraEditors.Repository.PersistentRepository REP_Editors;
        protected DevExpress.XtraEditors.Repository.RepositoryItemTextEdit EDT_Amount;
        protected DevExpress.XtraEditors.Repository.RepositoryItemDateEdit EDT_Date;
        protected DevExpress.XtraEditors.Repository.RepositoryItemTextEdit EDT_Percentage;

        public LunaView()
        {
            Icon = Icon.FromHandle(Properties.Resources.ApplicationIconSmall.GetHicon());
        }

        private void InitializeComponent()
        {
            this.REP_Editors = new DevExpress.XtraEditors.Repository.PersistentRepository(CON_Components);
            this.EDT_Amount = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
            this.EDT_Date = new DevExpress.XtraEditors.Repository.RepositoryItemDateEdit();
            this.EDT_Percentage = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
            ((System.ComponentModel.ISupportInitialize)this.LAY_Root).BeginInit();
            ((System.ComponentModel.ISupportInitialize)this.LAG_Root).BeginInit();
            ((System.ComponentModel.ISupportInitialize)this.BMA_Main).BeginInit();
            ((System.ComponentModel.ISupportInitialize)this.EDT_Amount).BeginInit();
            ((System.ComponentModel.ISupportInitialize)this.EDT_Percentage).BeginInit();
            ((System.ComponentModel.ISupportInitialize)this.EDT_Date).BeginInit();
            ((System.ComponentModel.ISupportInitialize)this.EDT_Date.VistaTimeProperties).BeginInit();
            this.SuspendLayout();

            // DOK_BarAndDockingController
            this.DOK_BarAndDockingController.Controller.PaintStyleName = "Skin";

            // REP_Editors
            this.REP_Editors.Items.AddRange(new RepositoryItem[] { this.EDT_Amount, this.EDT_Date, this.EDT_Percentage });

            // EDT_Amount 
            this.EDT_Percentage.DisplayFormat.FormatString = "P2";
            this.EDT_Percentage.Mask.EditMask = "P2";
            this.EDT_Percentage.Mask.UseMaskAsDisplayFormat = true;
            this.EDT_Percentage.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
            this.EDT_Percentage.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            this.EDT_Percentage.Name = "EDT_Percentage";

            // EDT_Amount 
            this.EDT_Amount.DisplayFormat.FormatString = "N2";
            this.EDT_Amount.Mask.EditMask = "N2";
            this.EDT_Amount.Mask.UseMaskAsDisplayFormat = true;
            this.EDT_Amount.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
            this.EDT_Amount.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            this.EDT_Amount.Name = "EDT_Amount";

            // EDT_Date
            this.EDT_Date.Buttons.Add(new EditorButton(ButtonPredefines.Combo));
            this.EDT_Date.Name = "EDT_Date";
            this.EDT_Date.VistaTimeProperties.Buttons.Add(new EditorButton());

            // LunaView
            this.ClientSize = new System.Drawing.Size(282, 255);
            this.Name = "LunaView";
            ((System.ComponentModel.ISupportInitialize)this.LAY_Root).EndInit();
            ((System.ComponentModel.ISupportInitialize)this.LAG_Root).EndInit();
            ((System.ComponentModel.ISupportInitialize)this.BMA_Main).EndInit();
            ((System.ComponentModel.ISupportInitialize)this.EDT_Amount).EndInit();
            ((System.ComponentModel.ISupportInitialize)this.EDT_Percentage).EndInit();
            ((System.ComponentModel.ISupportInitialize)this.EDT_Date.VistaTimeProperties).EndInit();
            ((System.ComponentModel.ISupportInitialize)this.EDT_Date).EndInit();
            this.ResumeLayout(false);
        }
    }
}
